package admin

import (
	"github.com/kataras/iris/v12"
	"github.com/kataras/iris/v12/hero"
	"iris_blog/controller/admin"
)

func Upload(party iris.Party) {
	uploads := party.Party("/upload")
	serve := admin.Uplaod{Max: 10, ImgAddress: "http://api.nuzn.cn/"}
	uploads.Post("/", hero.Handler(serve.Upload))
	uploads.Post("/img", hero.Handler(serve.UploadImg))
	uploads.Post("/xlsx", hero.Handler(serve.UploadXlsx))
	uploads.Post("/exportXlsx", hero.Handler(serve.UploadExportXlsx))
}
